package fullsail;

import robocode.HitWallEvent;
import robocode.TeamRobot;

public class YourRobotName extends TeamRobot
{
	boolean bForward;
	public void run()
	{
		
		while(true)
		{
			ahead(10);
			bForward = true;
		}
	}
    public void onHitWall(HitWallEvent e)
    {
    	reverseDirection();
    }
    public void reverseDirection()
    {
    	if(bForward)
    	{
    		back(10);
    		bForward = false;
    	}
    	else
    	{
    		ahead(10);
    	}
    }
}
